package evs1.restframework.util;

import org.hibernate.SessionFactory; 
import org.hibernate.cfg.AnnotationConfiguration;

public class InitSessionFactory 
{
	private static SessionFactory sessionFactory;
	
	static	{
		try {
		sessionFactory = new AnnotationConfiguration()
	      .addPackage("")	      
	      .configure()
	      .buildSessionFactory();
		}
      catch (RuntimeException ex)
      {
          System.out.println(ex.getMessage());            
      }
	}
	public static SessionFactory getSessionFactory()
	{
		return sessionFactory;
	}
}